package org.sxp.common.utils;

import lombok.Data;

/**
 * @author shenxingping
 * @date 2021/01/29
 */
@Data
public class PageInfo {
    private int pageNum;
    private int pageSize;
    private int size;
    private int startRow;
    private int endRow;
    private int pages;
    private int recordCounts;
    private int prePage;
    private int nextPage;
    private boolean isFirstPage = false;
    private boolean isLastPage = false;
    private String orderField;
    private String orderType;

    public static int countPages(int pageSize, int total){
        return (total-1)/pageSize+1;
    }
}
